Integrand size = 20, antiderivative size = 237 \[ \int (c+d x)^3 (a+a \cos (e+f x))^2 \, dx=-\frac {3 a^2 c d^2 x}{4 f^2}-\frac {3 a^2 d^3 x^2}{8 f^2}+\frac {3 a^2 (c+d x)^4}{8 d}-\frac {12 a^2 d^3 \cos (e+f x)}{f^4}+\frac {6 a^2 d (c+d x)^2 \cos (e+f x)}{f^2}-\frac {3 a^2 d^3 \cos ^2(e+f x)}{8 f^4}+\frac {3 a^2 d (c+d x)^2 \cos ^2(e+f x)}{4 f^2}-\frac {12 a^2 d^2 (c+d x) \sin (e+f x)}{f^3}+\frac {2 a^2 (c+d x)^3 \sin (e+f x)}{f}-\frac {3 a^2 d^2 (c+d x) \cos (e+f x) \sin (e+f x)}{4 f^3}+\frac {a^2 (c+d x)^3 \cos (e+f x) \sin (e+f x)}{2 f} \]
[Out]
Time = 0.30 (sec) , antiderivative size = 237, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, Rules used = {3398, 3377, 2718, 3392, 32, 3391} \[ \int (c+d x)^3 (a+a \cos (e+f x))^2 \, dx=-\frac {12 a^2 d^2 (c+d x) \sin (e+f x)}{f^3}-\frac {3 a^2 d^2 (c+d x) \sin (e+f x) \cos (e+f x)}{4 f^3}-\frac {3 a^2 c d^2 x}{4 f^2}+\frac {3 a^2 d (c+d x)^2 \cos ^2(e+f x)}{4 f^2}+\frac {6 a^2 d (c+d x)^2 \cos (e+f x)}{f^2}+\frac {2 a^2 (c+d x)^3 \sin (e+f x)}{f}+\frac {a^2 (c+d x)^3 \sin (e+f x) \cos (e+f x)}{2 f}+\frac {3 a^2 (c+d x)^4}{8 d}-\frac {3 a^2 d^3 \cos ^2(e+f x)}{8 f^4}-\frac {12 a^2 d^3 \cos (e+f x)}{f^4}-\frac {3 a^2 d^3 x^2}{8 f^2} \]
[In]
[Out]
Rule 32
Rule 2718
Rule 3377
Rule 3391
Rule 3392
Rule 3398
Rubi steps \begin{align*} \text {integral}& = \int \left (a^2 (c+d x)^3+2 a^2 (c+d x)^3 \cos (e+f x)+a^2 (c+d x)^3 \cos ^2(e+f x)\right ) \, dx \\ & = \frac {a^2 (c+d x)^4}{4 d}+a^2 \int (c+d x)^3 \cos ^2(e+f x) \, dx+\left (2 a^2\right ) \int (c+d x)^3 \cos (e+f x) \, dx \\ & = \frac {a^2 (c+d x)^4}{4 d}+\frac {3 a^2 d (c+d x)^2 \cos ^2(e+f x)}{4 f^2}+\frac {2 a^2 (c+d x)^3 \sin (e+f x)}{f}+\frac {a^2 (c+d x)^3 \cos (e+f x) \sin (e+f x)}{2 f}+\frac {1}{2} a^2 \int (c+d x)^3 \, dx-\frac {\left (3 a^2 d^2\right ) \int (c+d x) \cos ^2(e+f x) \, dx}{2 f^2}-\frac {\left (6 a^2 d\right ) \int (c+d x)^2 \sin (e+f x) \, dx}{f} \\ & = \frac {3 a^2 (c+d x)^4}{8 d}+\frac {6 a^2 d (c+d x)^2 \cos (e+f x)}{f^2}-\frac {3 a^2 d^3 \cos ^2(e+f x)}{8 f^4}+\frac {3 a^2 d (c+d x)^2 \cos ^2(e+f x)}{4 f^2}+\frac {2 a^2 (c+d x)^3 \sin (e+f x)}{f}-\frac {3 a^2 d^2 (c+d x) \cos (e+f x) \sin (e+f x)}{4 f^3}+\frac {a^2 (c+d x)^3 \cos (e+f x) \sin (e+f x)}{2 f}-\frac {\left (3 a^2 d^2\right ) \int (c+d x) \, dx}{4 f^2}-\frac {\left (12 a^2 d^2\right ) \int (c+d x) \cos (e+f x) \, dx}{f^2} \\ & = -\frac {3 a^2 c d^2 x}{4 f^2}-\frac {3 a^2 d^3 x^2}{8 f^2}+\frac {3 a^2 (c+d x)^4}{8 d}+\frac {6 a^2 d (c+d x)^2 \cos (e+f x)}{f^2}-\frac {3 a^2 d^3 \cos ^2(e+f x)}{8 f^4}+\frac {3 a^2 d (c+d x)^2 \cos ^2(e+f x)}{4 f^2}-\frac {12 a^2 d^2 (c+d x) \sin (e+f x)}{f^3}+\frac {2 a^2 (c+d x)^3 \sin (e+f x)}{f}-\frac {3 a^2 d^2 (c+d x) \cos (e+f x) \sin (e+f x)}{4 f^3}+\frac {a^2 (c+d x)^3 \cos (e+f x) \sin (e+f x)}{2 f}+\frac {\left (12 a^2 d^3\right ) \int \sin (e+f x) \, dx}{f^3} \\ & = -\frac {3 a^2 c d^2 x}{4 f^2}-\frac {3 a^2 d^3 x^2}{8 f^2}+\frac {3 a^2 (c+d x)^4}{8 d}-\frac {12 a^2 d^3 \cos (e+f x)}{f^4}+\frac {6 a^2 d (c+d x)^2 \cos (e+f x)}{f^2}-\frac {3 a^2 d^3 \cos ^2(e+f x)}{8 f^4}+\frac {3 a^2 d (c+d x)^2 \cos ^2(e+f x)}{4 f^2}-\frac {12 a^2 d^2 (c+d x) \sin (e+f x)}{f^3}+\frac {2 a^2 (c+d x)^3 \sin (e+f x)}{f}-\frac {3 a^2 d^2 (c+d x) \cos (e+f x) \sin (e+f x)}{4 f^3}+\frac {a^2 (c+d x)^3 \cos (e+f x) \sin (e+f x)}{2 f} \\ \end{align*}
Time = 1.66 (sec) , antiderivative size = 217, normalized size of antiderivative = 0.92 \[ \int (c+d x)^3 (a+a \cos (e+f x))^2 \, dx=\frac {a^2 \left (96 d \left (c^2 f^2+2 c d f^2 x+d^2 \left (-2+f^2 x^2\right )\right ) \cos (e+f x)+3 d \left (2 c^2 f^2+4 c d f^2 x+d^2 \left (-1+2 f^2 x^2\right )\right ) \cos (2 (e+f x))+2 f \left (3 f^3 x \left (4 c^3+6 c^2 d x+4 c d^2 x^2+d^3 x^3\right )+16 (c+d x) \left (c^2 f^2+2 c d f^2 x+d^2 \left (-6+f^2 x^2\right )\right ) \sin (e+f x)+(c+d x) \left (2 c^2 f^2+4 c d f^2 x+d^2 \left (-3+2 f^2 x^2\right )\right ) \sin (2 (e+f x))\right )\right )}{16 f^4} \]
[In]
[Out]
Time = 1.57 (sec) , antiderivative size = 180, normalized size of antiderivative = 0.76
method | result | size |
parallelrisch | \(\frac {\left (\left (d x +c \right ) \left (\left (d x +c \right )^{2} f^{2}-\frac {3 d^{2}}{2}\right ) f \sin \left (2 f x +2 e \right )+\frac {3 \left (\left (d x +c \right )^{2} f^{2}-\frac {d^{2}}{2}\right ) d \cos \left (2 f x +2 e \right )}{2}+8 \left (d x +c \right ) \left (\left (d x +c \right )^{2} f^{2}-6 d^{2}\right ) f \sin \left (f x +e \right )+24 \left (\left (d x +c \right )^{2} f^{2}-2 d^{2}\right ) d \cos \left (f x +e \right )+\left (6 c \,d^{2} x^{3}+9 x^{2} c^{2} d +\frac {3}{2} d^{3} x^{4}+6 x \,c^{3}\right ) f^{4}+\frac {45 c^{2} d \,f^{2}}{2}-\frac {189 d^{3}}{4}\right ) a^{2}}{4 f^{4}}\) | \(180\) |
risch | \(\frac {3 a^{2} d^{3} x^{4}}{8}+\frac {3 a^{2} c \,d^{2} x^{3}}{2}+\frac {9 a^{2} d \,c^{2} x^{2}}{4}+\frac {3 a^{2} c^{3} x}{2}+\frac {3 a^{2} c^{4}}{8 d}+\frac {6 a^{2} d \left (d^{2} x^{2} f^{2}+2 c d \,f^{2} x +c^{2} f^{2}-2 d^{2}\right ) \cos \left (f x +e \right )}{f^{4}}+\frac {2 a^{2} \left (d^{3} x^{3} f^{2}+3 c \,d^{2} f^{2} x^{2}+3 c^{2} d \,f^{2} x +c^{3} f^{2}-6 d^{3} x -6 d^{2} c \right ) \sin \left (f x +e \right )}{f^{3}}+\frac {3 a^{2} d \left (2 d^{2} x^{2} f^{2}+4 c d \,f^{2} x +2 c^{2} f^{2}-d^{2}\right ) \cos \left (2 f x +2 e \right )}{16 f^{4}}+\frac {a^{2} \left (2 d^{3} x^{3} f^{2}+6 c \,d^{2} f^{2} x^{2}+6 c^{2} d \,f^{2} x +2 c^{3} f^{2}-3 d^{3} x -3 d^{2} c \right ) \sin \left (2 f x +2 e \right )}{8 f^{3}}\) | \(291\) |
norman | \(\frac {\frac {12 a^{2} c^{2} d \,f^{2}-24 a^{2} d^{3}}{f^{4}}+\frac {3 a^{2} d^{3} x^{4}}{8}+\frac {\left (18 a^{2} c^{2} d \,f^{2}-45 a^{2} d^{3}\right ) \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 f^{4}}+\frac {3 a^{2} c \,d^{2} x^{3}}{2}+\frac {3 a^{2} d^{3} x^{4} \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4}+\frac {3 a^{2} d^{3} x^{4} \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{8}+3 a^{2} c \,d^{2} x^{3} \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\frac {3 a^{2} c \,d^{2} x^{3} \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2}+\frac {3 a^{2} c \left (2 c^{2} f^{2}-15 d^{2}\right ) \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 f^{3}}+\frac {3 a^{2} c \left (2 c^{2} f^{2}+17 d^{2}\right ) x}{4 f^{2}}+\frac {a^{2} c \left (10 c^{2} f^{2}-51 d^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{2 f^{3}}+\frac {3 a^{2} d \left (6 c^{2} f^{2}+17 d^{2}\right ) x^{2}}{8 f^{2}}+\frac {5 a^{2} d^{3} x^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{f}+\frac {3 a^{2} d^{3} x^{3} \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}+\frac {15 a^{2} c \,d^{2} x^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{f}+\frac {9 a^{2} c \,d^{2} x^{2} \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}+\frac {3 a^{2} c \left (2 c^{2} f^{2}-3 d^{2}\right ) x \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 f^{2}}+\frac {9 a^{2} d \left (2 c^{2} f^{2}-5 d^{2}\right ) x \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 f^{3}}+\frac {9 a^{2} d \left (2 c^{2} f^{2}-d^{2}\right ) x^{2} \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4 f^{2}}+\frac {3 a^{2} d \left (10 c^{2} f^{2}-17 d^{2}\right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{2 f^{3}}+\frac {3 a^{2} c \left (2 c^{2} f^{2}-15 d^{2}\right ) x \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4 f^{2}}+\frac {9 a^{2} d \left (2 c^{2} f^{2}-5 d^{2}\right ) x^{2} \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{8 f^{2}}}{\left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{2}}\) | \(619\) |
parts | \(\text {Expression too large to display}\) | \(911\) |
derivativedivides | \(\text {Expression too large to display}\) | \(1129\) |
default | \(\text {Expression too large to display}\) | \(1129\) |
[In]
[Out]
none
Time = 0.29 (sec) , antiderivative size = 369, normalized size of antiderivative = 1.56 \[ \int (c+d x)^3 (a+a \cos (e+f x))^2 \, dx=\frac {3 \, a^{2} d^{3} f^{4} x^{4} + 12 \, a^{2} c d^{2} f^{4} x^{3} + 3 \, {\left (6 \, a^{2} c^{2} d f^{4} - a^{2} d^{3} f^{2}\right )} x^{2} + 3 \, {\left (2 \, a^{2} d^{3} f^{2} x^{2} + 4 \, a^{2} c d^{2} f^{2} x + 2 \, a^{2} c^{2} d f^{2} - a^{2} d^{3}\right )} \cos \left (f x + e\right )^{2} + 6 \, {\left (2 \, a^{2} c^{3} f^{4} - a^{2} c d^{2} f^{2}\right )} x + 48 \, {\left (a^{2} d^{3} f^{2} x^{2} + 2 \, a^{2} c d^{2} f^{2} x + a^{2} c^{2} d f^{2} - 2 \, a^{2} d^{3}\right )} \cos \left (f x + e\right ) + 2 \, {\left (8 \, a^{2} d^{3} f^{3} x^{3} + 24 \, a^{2} c d^{2} f^{3} x^{2} + 8 \, a^{2} c^{3} f^{3} - 48 \, a^{2} c d^{2} f + 24 \, {\left (a^{2} c^{2} d f^{3} - 2 \, a^{2} d^{3} f\right )} x + {\left (2 \, a^{2} d^{3} f^{3} x^{3} + 6 \, a^{2} c d^{2} f^{3} x^{2} + 2 \, a^{2} c^{3} f^{3} - 3 \, a^{2} c d^{2} f + 3 \, {\left (2 \, a^{2} c^{2} d f^{3} - a^{2} d^{3} f\right )} x\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{8 \, f^{4}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 779 vs. \(2 (243) = 486\).
Time = 0.44 (sec) , antiderivative size = 779, normalized size of antiderivative = 3.29 \[ \int (c+d x)^3 (a+a \cos (e+f x))^2 \, dx=\begin {cases} \frac {a^{2} c^{3} x \sin ^{2}{\left (e + f x \right )}}{2} + \frac {a^{2} c^{3} x \cos ^{2}{\left (e + f x \right )}}{2} + a^{2} c^{3} x + \frac {a^{2} c^{3} \sin {\left (e + f x \right )} \cos {\left (e + f x \right )}}{2 f} + \frac {2 a^{2} c^{3} \sin {\left (e + f x \right )}}{f} + \frac {3 a^{2} c^{2} d x^{2} \sin ^{2}{\left (e + f x \right )}}{4} + \frac {3 a^{2} c^{2} d x^{2} \cos ^{2}{\left (e + f x \right )}}{4} + \frac {3 a^{2} c^{2} d x^{2}}{2} + \frac {3 a^{2} c^{2} d x \sin {\left (e + f x \right )} \cos {\left (e + f x \right )}}{2 f} + \frac {6 a^{2} c^{2} d x \sin {\left (e + f x \right )}}{f} - \frac {3 a^{2} c^{2} d \sin ^{2}{\left (e + f x \right )}}{4 f^{2}} + \frac {6 a^{2} c^{2} d \cos {\left (e + f x \right )}}{f^{2}} + \frac {a^{2} c d^{2} x^{3} \sin ^{2}{\left (e + f x \right )}}{2} + \frac {a^{2} c d^{2} x^{3} \cos ^{2}{\left (e + f x \right )}}{2} + a^{2} c d^{2} x^{3} + \frac {3 a^{2} c d^{2} x^{2} \sin {\left (e + f x \right )} \cos {\left (e + f x \right )}}{2 f} + \frac {6 a^{2} c d^{2} x^{2} \sin {\left (e + f x \right )}}{f} - \frac {3 a^{2} c d^{2} x \sin ^{2}{\left (e + f x \right )}}{4 f^{2}} + \frac {3 a^{2} c d^{2} x \cos ^{2}{\left (e + f x \right )}}{4 f^{2}} + \frac {12 a^{2} c d^{2} x \cos {\left (e + f x \right )}}{f^{2}} - \frac {3 a^{2} c d^{2} \sin {\left (e + f x \right )} \cos {\left (e + f x \right )}}{4 f^{3}} - \frac {12 a^{2} c d^{2} \sin {\left (e + f x \right )}}{f^{3}} + \frac {a^{2} d^{3} x^{4} \sin ^{2}{\left (e + f x \right )}}{8} + \frac {a^{2} d^{3} x^{4} \cos ^{2}{\left (e + f x \right )}}{8} + \frac {a^{2} d^{3} x^{4}}{4} + \frac {a^{2} d^{3} x^{3} \sin {\left (e + f x \right )} \cos {\left (e + f x \right )}}{2 f} + \frac {2 a^{2} d^{3} x^{3} \sin {\left (e + f x \right )}}{f} - \frac {3 a^{2} d^{3} x^{2} \sin ^{2}{\left (e + f x \right )}}{8 f^{2}} + \frac {3 a^{2} d^{3} x^{2} \cos ^{2}{\left (e + f x \right )}}{8 f^{2}} + \frac {6 a^{2} d^{3} x^{2} \cos {\left (e + f x \right )}}{f^{2}} - \frac {3 a^{2} d^{3} x \sin {\left (e + f x \right )} \cos {\left (e + f x \right )}}{4 f^{3}} - \frac {12 a^{2} d^{3} x \sin {\left (e + f x \right )}}{f^{3}} + \frac {3 a^{2} d^{3} \sin ^{2}{\left (e + f x \right )}}{8 f^{4}} - \frac {12 a^{2} d^{3} \cos {\left (e + f x \right )}}{f^{4}} & \text {for}\: f \neq 0 \\\left (a \cos {\left (e \right )} + a\right )^{2} \left (c^{3} x + \frac {3 c^{2} d x^{2}}{2} + c d^{2} x^{3} + \frac {d^{3} x^{4}}{4}\right ) & \text {otherwise} \end {cases} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 949 vs. \(2 (223) = 446\).
Time = 0.40 (sec) , antiderivative size = 949, normalized size of antiderivative = 4.00 \[ \int (c+d x)^3 (a+a \cos (e+f x))^2 \, dx=\text {Too large to display} \]
[In]
[Out]
none
Time = 0.31 (sec) , antiderivative size = 335, normalized size of antiderivative = 1.41 \[ \int (c+d x)^3 (a+a \cos (e+f x))^2 \, dx=\frac {3}{8} \, a^{2} d^{3} x^{4} + \frac {3}{2} \, a^{2} c d^{2} x^{3} + \frac {9}{4} \, a^{2} c^{2} d x^{2} + \frac {3}{2} \, a^{2} c^{3} x + \frac {3 \, {\left (2 \, a^{2} d^{3} f^{2} x^{2} + 4 \, a^{2} c d^{2} f^{2} x + 2 \, a^{2} c^{2} d f^{2} - a^{2} d^{3}\right )} \cos \left (2 \, f x + 2 \, e\right )}{16 \, f^{4}} + \frac {6 \, {\left (a^{2} d^{3} f^{2} x^{2} + 2 \, a^{2} c d^{2} f^{2} x + a^{2} c^{2} d f^{2} - 2 \, a^{2} d^{3}\right )} \cos \left (f x + e\right )}{f^{4}} + \frac {{\left (2 \, a^{2} d^{3} f^{3} x^{3} + 6 \, a^{2} c d^{2} f^{3} x^{2} + 6 \, a^{2} c^{2} d f^{3} x + 2 \, a^{2} c^{3} f^{3} - 3 \, a^{2} d^{3} f x - 3 \, a^{2} c d^{2} f\right )} \sin \left (2 \, f x + 2 \, e\right )}{8 \, f^{4}} + \frac {2 \, {\left (a^{2} d^{3} f^{3} x^{3} + 3 \, a^{2} c d^{2} f^{3} x^{2} + 3 \, a^{2} c^{2} d f^{3} x + a^{2} c^{3} f^{3} - 6 \, a^{2} d^{3} f x - 6 \, a^{2} c d^{2} f\right )} \sin \left (f x + e\right )}{f^{4}} \]
[In]
[Out]
Time = 15.28 (sec) , antiderivative size = 452, normalized size of antiderivative = 1.91 \[ \int (c+d x)^3 (a+a \cos (e+f x))^2 \, dx=\frac {16\,a^2\,c^3\,f^3\,\sin \left (e+f\,x\right )-\frac {3\,a^2\,d^3\,\cos \left (2\,e+2\,f\,x\right )}{2}-96\,a^2\,d^3\,\cos \left (e+f\,x\right )+12\,a^2\,c^3\,f^4\,x+2\,a^2\,c^3\,f^3\,\sin \left (2\,e+2\,f\,x\right )+3\,a^2\,d^3\,f^4\,x^4-96\,a^2\,c\,d^2\,f\,\sin \left (e+f\,x\right )-96\,a^2\,d^3\,f\,x\,\sin \left (e+f\,x\right )+3\,a^2\,d^3\,f^2\,x^2\,\cos \left (2\,e+2\,f\,x\right )+2\,a^2\,d^3\,f^3\,x^3\,\sin \left (2\,e+2\,f\,x\right )+48\,a^2\,c^2\,d\,f^2\,\cos \left (e+f\,x\right )-3\,a^2\,c\,d^2\,f\,\sin \left (2\,e+2\,f\,x\right )-3\,a^2\,d^3\,f\,x\,\sin \left (2\,e+2\,f\,x\right )+3\,a^2\,c^2\,d\,f^2\,\cos \left (2\,e+2\,f\,x\right )+18\,a^2\,c^2\,d\,f^4\,x^2+12\,a^2\,c\,d^2\,f^4\,x^3+48\,a^2\,d^3\,f^2\,x^2\,\cos \left (e+f\,x\right )+16\,a^2\,d^3\,f^3\,x^3\,\sin \left (e+f\,x\right )+6\,a^2\,c\,d^2\,f^2\,x\,\cos \left (2\,e+2\,f\,x\right )+6\,a^2\,c^2\,d\,f^3\,x\,\sin \left (2\,e+2\,f\,x\right )+48\,a^2\,c\,d^2\,f^3\,x^2\,\sin \left (e+f\,x\right )+6\,a^2\,c\,d^2\,f^3\,x^2\,\sin \left (2\,e+2\,f\,x\right )+96\,a^2\,c\,d^2\,f^2\,x\,\cos \left (e+f\,x\right )+48\,a^2\,c^2\,d\,f^3\,x\,\sin \left (e+f\,x\right )}{8\,f^4} \]
[In]
[Out]